Conventionally, a device for measuring the rotational angle of a rotating body with influence due to play and/or eccentricity in the rotating shaft being eliminated, has been known and described in Japanese Patent Application Pre-examination Public Disclosure No. Sho 55-67608 published on May 21, 1980. The rotational angle measuring device which is described as prior art in this public disclosure is a photoelectric rotational angle measuring device as shown in the block diagram of FIG. 1, wherein a rotating coding disk 2, which has radial slit gratings 2A arranged annularly at equal angular pitches P as shown in FIG. 2, is fixed to a rotating shaft 1, which is an object to be measured, for rotation together with the rotating shaft 1, with the slit gratings in a substantially concentric relationship with the rotating shaft 1. Opposed to and concentrically with the rotating disk 2, an unrotatable index disk 3 is provided. This index disk 3 is provided with two groups of index slit gratings 3A, 3B arranged in a diametrically opposing relationship ship with an angular difference of ##EQU1## (wherein n is an integer) therebetween as shown in FIG. 3. Light sources 4A, 4B and photoelectric conversion element 5A, 5B are located to put therebetween the index gratings 3A, 3B and the rotating code disk 2. Upon rotation of the rotating shaft 1, sinusoidal signals as indicated from the photoelectric conversion elements 5A, 5B. The output signals from the photoelectric conversion elements 5A, 5B are directly supplied to a differential amplifier 6 for cancelling direct current components in the respective signals, and then supplied to a Schmitt circuit 7 where the signal is converted into rectangular waves, which are in turn converted by a pulse generating circuit 8 into pulses which correspond to the leading or trailing edges of the rectangular waves. The pulses generated from the pulse generating circuit 8 are counted by a counter 9, and the counted value is converted into a rotational angle of the rotating shaft 1 and is displayed by a display unit 10.
The pulse generating circuit 8 of the above-described conventional rotational angle measuring device has been composed from a differentiating circuit employing a capacitor and a resistor for deriving pulses which correspond to the leading or trailing edge or both edges of a detection signal.
The capacitor and resistor employed in the differentiating circuit, however, are highly dependent on temperature, and thus the threshold level may be varied by the influence of variation of temperature to cause an error, resulting in decreased reliability. Further, differentiating circuits of the number corresponding to the necessary number of edge detections are required, resulting in an increased number of components. Because of this and because capacitors and resistors cannot be easily realized in an integrated circuit, the construction of an electronic circuit is inevitably complicated and is prevented from being small-sized.
On the other hand, the above-described conventional device, even if output signals of the photoelectric conversion elements 5A, 5B would shift in phase from signals of reference (0.degree.) phases (represented as E sin .omega.t and E sin (.omega.t+.pi.), respectively) because of play of the rotating shaft 1 and eccentricity in the rotating shaft 1 and the disk 2, since the index gratings 3A, 3B are located in a diametrically opposing fashion, that is, at rotationally symmetrical positions, these phase shifts will be of an equal amount .psi. in opposite directions with respect to each other, as shown at 4A, 4B in FIG. 4. Accordingly, output signals of the photoelectric conversion elements 5A, 5B will be of E sin (.omega.t+.psi.) and E sin (.omega.t+.pi.-.psi.), respectively, as indicated at 4A, 4B in FIG. 4, and differential signal of the outputs of the photoelectric conversion elements 5A, 5B will be of 2E cos .psi. sin .omega.t as seen at 4C in FIG. 4. Consequently, digital processing will be made on the basis of a signal with phase shift having compensated.
In the above-described conventional device, however, since the differential signal of output signals of the photoelectric conversion elements 5A, 5B is 2E cos .psi. in amplitude as indicated at 4C in FIG. 4, when .psi. is near 90.degree. due to, for example, some amount of play and/or eccentricity in the rotating shaft 1, the magnitude of the differential signal will become almost zero, resulting in an erroneous counting of the number of pulses. For example, when a grating plate having 10.mu. pitches is used, a largest deviation of 4.mu. will appear at the center if there is an eccentricity of 2.mu., and accordingly it is apparent that there is a portion which is affected by an eccentricity of up to 10.mu..times.1/4 period, i.e. 2.5.mu., or more, so that an erroneous counting would occur.
In order to avoid the above-described drawbacks, the above-mentioned Japanese Patent Application Preexamination Public Disclosure discloses a rotational angle measuring device as shown in FIG. 5. In FIG. 5, similar parts to those in FIG. 1 are indicated by like symbols. This rotational angle measuring device comprises, as shown in FIG. 5, a rotating shaft 1, a rotating disk 2, an index disk 3, light sources 4A and 4B, and photoelectric conversion elements 5A, 5B, which are similar in construction to those in FIG. 1. Output signals of the photoelectric conversion elements 5A, 5B are converted by Schmitt trigger circuits 11A, 11B into rectangular waves, which are then converted by pulse generating circuits 12A, 12B into pulses which correspond to the leading and trailing edges of the rectangular waves. These pulses are counted respectively by counters 13A, 13B, and the counted values are averaged by an averaging circuit 14 for displaying rotational angle of the rotating body by a display unit 10.
In the device of FIG. 5, however, there is a disadvantage that, if the averaging circuit 14 would be constructed from hardware, then the construction will be complicated very much. Alternatively, if the averaging process would be performed by means of software, then there is also a disadvantage that the processing speed will become a problem, and real-time display of rotational angle is sometimes impossible. Further, in this device, there is a disadvantage that, as is seen from FIG. 5, there are required two series of identical circuits, which include the pulse generating circuits 12A, 12B composed of differentiating circuits as described above, and the counters 13A, 13B, thus becoming as much complicated and uneconomical.
Further, individual code elements, which are provided in a coding member such as the rotating disk 2 employed in this type of rotational angle measuring device, are identical to each other, as in the case of the slit gratings 2A, and therefore cannot be distinguished individually. Accordingly, by counting detection signals, an amount of displacement such as a rotational angle can be obtained as described above. That is to say, this type of codes is a so-called incremental type. This incremental type of codes is the one which is to be contrasted with a so-called absolute type of codes wherein discriminatable codes are provided on one-by-one basis in a coding member taking a predetermined absolute origin as the reference, so that a position can be known only by reading the particular code. The absolute type of codes is high in reliability, but is complicated in construction and expensive. Accordingly, the incremental type of codes, which is simpler in construction than the absolute type, is widely employed.
In displacement measurement using the incremental type of codes, an erroneous counting of detection signals becomes, just as it is, a measurement error, which is a main reason that the incremental type is said to be lower in reliability than the absolute type. Such erroneous counting occurs, when an coding member moves at a speed higher than the response speed of an detecting means, when output of the detecting means decreases, or when, in a measuring device having a plurality of detection elements located so that the detection signals may have a phase difference for example 90.degree. to each other in order to make a fine signals, which should precisely be 90.degree., becomes extremely large or extremely small. Practically, erroneous counting, which occurs due to a too high speed displacement of the coding member, depends on response speed of the detection means determined by the characteristic of elements and circuit used, and therefore cannot be avoided. Erroneous counting due to variation in phase difference can be considered that it results from the fact that intervals between pulses, which represent the leading or trailing edges or both edges of first and second detection signals that should be shifted from each other by a predetermined phase difference, become smaller, so that the counter becomes unable to discriminate the pulses from each other, thereby missing in accurate counting. Causes of such phase shift can be considered to be positional shifts of the coding member, the index slit and the light emitting element in case of optical detection, and to be positional shifts of the coding member and the magnetic detection element in case of magnetic detection. Decreased output of the detection means makes it difficult for the detection signals to be encoded into codes of "0" and "1", resulting in an erroneous counting. Such decreased output of the detection means can be considered to be caused by soils on the light emitting portion, the coding member, decrease in the voltage applied to the light emitting element, and abnormality in the light emitting element or in the light receiving element in case of optical detection, and to be caused by soils on the surface of the magnetic material on the coding member, increase in the distance between the code member and the magnetic detection element, and abnormality in the magnetic detection element in case of magnetic detection.
In the past, however, no countermeasure has been devised against such problem of erroneous counting except Japanese Patent Application Pre-examination Public Disclosure No. Sho 55-42324 published on Dec. 30, 1980, which discloses a circuit which is adapted to always compare output of detection means with a predetermined level, and offer an alarm when the output of detection means has decreased. In the alarm circuit disclosed in this Public Disclosure, however, if the output of detection means would include therein a noise exceeding the predetermined level, it then makes a judgement that there is no abnormality, because such noise exceeds the predetermined level, and accordingly it is insufficient in reliability for level detection.
Accordingly, this invention is intended to provide a displacement measuring device which employs no differentiating circuit comprising a capacitor and a resistor.
Furthermore, this invention is intended to provide a displacement measuring device which eliminates the drawbacks and complexity in the above-described conventional devices, and can be used in an angular displacement measuring equipment which can measure rotational angle and rotational speed with high accuracy, with a simple construction, and without being affected by play and/or eccentricity in the rotating shaft of a rotating body.
Also, this invention is intended to provide a displacement measuring device which is adapted to give an alarm of erroneous counting such as described above.
In particular, a first object of this invention is to provide a displacement measuring device which employs a clock pulse generator in place of a differentiating circuit, so that clock pulses, which substantially coincide in time with predetermined states such as the zero crossing leading or trailing edges of detection signals from detecting means, are drawn out, and the drawn-out clock pulses are counted to make a measurement of an amount of displacement.
A second object of the invention is to provide a displacement measuring device which employs no averaging circuit and is simple in construction such that only one up-down counter suffices in number, and which can constitute an angular displacement measuring equipment which is not affected by play and/or eccentricity in a rotating shaft.
A third object of this invention is to provide a displacement measuring device which gives an alarm at the time when displacement speed of an object under measurement exceeds a predetermined value.
A fourth object of the invention is to provide a displacement measuring device adapted to generate an alarm when the phase difference between first and second detection signals from first and second detection means, which should be shifted from each other by a predetermined phase difference, has become smaller than the predetermined value.
A fifth object of the invention is to provide a displacement measuring device wherein, in order to discriminate with high accuracy whether output of detection means is larger than a predetermined value, detection signals are compared with a reference value at the time when the detection signal takes the maximum or minimum value, thereby to give an alarm.